package nio;

import java.io.IOException;
import java.nio.file.CopyOption;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;

public class CopySystem {

	public static void main(String[] args) throws IOException {
		long start = System.currentTimeMillis();
		Files.copy(Paths.get("data/data.bin"), Paths.get("data/out_nio" + Math.random() + ".bin"));
		long end = System.currentTimeMillis();
		long delta = end - start;
		System.out.println("Total time (local copy NIO): " + delta + " ms.");
	}

}
